<template>

		<view class="uv-content">
				<uv-parse :content="data"></uv-parse>
			</view>
</template>

<script setup>
import { onMounted, ref } from "vue";
import useGetGlobalProperties from '@/util/useGlobal.js'
//const url = useGetGlobalProperties().$localHttp;
const url = useGetGlobalProperties().$https;
	const data = ref();
	const init=()=>{
		uni.showLoading({
			title:'正在加载中'
		})
		let urlFile = uni.getStorageSync('bookFileUrl');
		// urlFile = urlFile.replace('http://61.163.243.7:9000/lengleng/','');
		// console.log('urlFile',urlFile)
		//let urls = 'http://localhost:9999';
		uni.request({
			url:url+'/wxApi/appInterface/downloadAndParseEpub',
			method:'GET',
			data:{
				url:urlFile
			},
			success: (res) => {
				data.value=res.data;
				console.log(res.data)
				uni.hideLoading()
			}
		})
	}
	onMounted(()=>{
		init();
	})
</script>

<style>
	@import url("./index.css");
</style>